1. Field of the Invention
The present invention relates to a moving picture encoding apparatus, a moving picture decoding apparatus, a moving picture encoding method, a moving picture decoding method, a moving picture encoding program, and a moving picture decoding program.
2. Related Background Art
An instance of the conventional moving picture encoding system is moving picture encoding apparatus and moving picture decoding apparatus based on the H.264/AVC encoding system (cf. Joint Video Team (JVT) of ISO/IEC MPEG and ITU-VCEG, “Editor's Proposed Draft Text Modifications for Joint Video Specification (ITU-T Rec.H.264|ISO/IEC 14496-10 AVC), Geneva modifications draft 37”). This system is to reduce redundancy existing in temporal directions, by motion compensated interframe prediction, and further reduce redundancy remaining in spatial directions, by orthogonal transformation, thereby implementing information compression of a moving picture (input video signal).
Since the motion compensated interframe prediction in the above system (hereinafter referred to as “INTER prediction mode”) allows preparing a plurality of reference frame images for detection of a motion vector, there are cases where motion vectors of previously coded regions around a coding target region are motion compensated using their respective reference frame images different from one another.
For calculating a predicted motion vector for a coding target region, regardless of which reference frame image was used for motion compensation for motion vectors of previously coded regions around the target region, values of those motion vectors are compared and a median thereof is adopted as a motion vector estimate for the coding target region.